<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
    

<head>
    <meta charset="utf-8">
    <meta name="keywords" content="openseadragon, Emper,ltg博客,liutiangaung,刘天广,刘天广博客, openseadragonKeywo0rd教程">
    <meta name="description" content="项目介绍：H5页面，实现长按按钮图片（清明上河图）自动播放 . . .
openseadragon 基于Web的开源查看器，用于高分辨率可缩放图像，以纯JavaScript实现，适用于桌面和移动设备。

技术背景图片大部分都是压缩过的，大部">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="baidu-site-verification" content="MhgyQ2jfXk" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit|ie-stand|ie-comp">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <title>openseadragon | Emper</title>
    <link rel="icon" type="image/png" href="/favicon.ico">

    <link rel="stylesheet" type="text/css" href="/libs/awesome/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/materialize/css/materialize.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/aos/aos.css">
    <link rel="stylesheet" type="text/css" href="/libs/animate/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/lightGallery/css/lightgallery.min.css">
    <link rel="stylesheet" type="text/css" href="/css/matery.css">
    <link rel="stylesheet" type="text/css" href="/css/my.css">

    <script src="/libs/jquery/jquery-2.2.0.min.js"></script>
<link rel="stylesheet" href="/css/prism-tomorrow.css" type="text/css">
<link rel="stylesheet" href="/css/prism-line-numbers.css" type="text/css"></head>

</head>

<body>

<header class="navbar-fixed">
    <nav id="headNav" class="bg-color nav-transparent">
        <div id="navContainer" class="container">
            <div class="nav-wrapper">
                <div class="brand-logo">
                    <a href="/" class="waves-effect waves-light">
                        
                        <img src="/medias/logo.png" class="logo-img hide-on-small-only">
                        
                        <span class="logo-span">Emper</span>
                    </a>
                </div>
                <a href="#" data-activates="mobile-nav" class="button-collapse"><i class="fa fa-navicon"></i></a>
<ul class="right">
    
    <li class="hide-on-med-and-down">
        <a href="/" class="waves-effect waves-light">
            
            <i class="fa fa-home"></i>
            
            <span>首页</span>
        </a>
    </li>
    
    <li class="hide-on-med-and-down">
        <a href="/tags" class="waves-effect waves-light">
            
            <i class="fa fa-tags"></i>
            
            <span>标签</span>
        </a>
    </li>
    
    <li class="hide-on-med-and-down">
        <a href="/categories" class="waves-effect waves-light">
            
            <i class="fa fa-bookmark"></i>
            
            <span>分类</span>
        </a>
    </li>
    
    <li class="hide-on-med-and-down">
        <a href="/archives" class="waves-effect waves-light">
            
            <i class="fa fa-archive"></i>
            
            <span>归档</span>
        </a>
    </li>
    
    <li class="hide-on-med-and-down">
        <a href="/about" class="waves-effect waves-light">
            
            <i class="fa fa-user-circle-o"></i>
            
            <span>关于</span>
        </a>
    </li>
    
    <li>
        <a id="toggleSearch" class="waves-effect waves-light">
            <i id="searchIcon" class="mdi-action-search"></i>
        </a>
    </li>

</ul>

<div class="side-nav" id="mobile-nav">

    <div class="mobile-head bg-color">
        
        <img src="/medias/logo.png" class="logo-img circle responsive-img">
        
        <div class="logo-name">Emper</div>
        <div class="logo-desc">
            
            学知不足，业精于勤,
            
        </div>
    </div>

    <ul class="menu-list mobile-menu-list">
        
        <li>
            <a href="/" class="waves-effect waves-light">
                
                <i class="fa fa-fw fa-home"></i>
                
                首页
            </a>
        </li>
        
        <li>
            <a href="/tags" class="waves-effect waves-light">
                
                <i class="fa fa-fw fa-tags"></i>
                
                标签
            </a>
        </li>
        
        <li>
            <a href="/categories" class="waves-effect waves-light">
                
                <i class="fa fa-fw fa-bookmark"></i>
                
                分类
            </a>
        </li>
        
        <li>
            <a href="/archives" class="waves-effect waves-light">
                
                <i class="fa fa-fw fa-archive"></i>
                
                归档
            </a>
        </li>
        
        <li>
            <a href="/about" class="waves-effect waves-light">
                
                <i class="fa fa-fw fa-user-circle-o"></i>
                
                关于
            </a>
        </li>
        
        
        <li><div class="divider"></div></li>
        <li>
            <a href="https://github.com/tianguanggliu/tianguanggliu.github.io" class="waves-effect waves-light" target="_blank">
                <i class="fa fa-github-square fa-fw"></i>Fork Me
            </a>
        </li>
        
    </ul>

    <div class="social-link"><a href="https://github.com/tianguanggliu" class="tooltipped" target="_blank" data-tooltip="我的GitHub" data-position="top" data-delay="50">
    <i class="fa fa-github"></i>
</a>
<a href="mailto:tianguangliu@163.com" class="tooltipped" target="_blank" data-tooltip="邮件联系我" data-position="top" data-delay="50">
    <i class="fa fa-envelope-open"></i>
</a>
<a href="#!" class="tooltipped" data-tooltip="QQ联系我: 734930392" data-position="top" data-delay="50">
    <i class="fa fa-qq"></i>
</a>

<a href="/atom.xml" class="tooltipped" target="_blank" data-tooltip="RSS 订阅" data-position="top" data-delay="50">
    <i class="fa fa-rss"></i>
</a>
</div>
</div>

            </div>
        </div>

        
        <style>
    .nav-transparent .github-corner {
        display: none !important;
    }

    .github-corner {
        position: absolute;
        z-index: 10;
        top: 0;
        right: 0;
        border: 0;
        transform: scale(1.1);
    }

    .github-corner svg {
        color: #0f9d58;
        fill: #fff;
        height: 64px;
        width: 64px;
    }

    .github-corner:hover .octo-arm {
        animation: a 0.56s ease-in-out;
    }

    .github-corner .octo-arm {
        animation: none;
    }

    @keyframes a {
        0%,
        to {
            transform: rotate(0);
        }
        20%,
        60% {
            transform: rotate(-25deg);
        }
        40%,
        80% {
            transform: rotate(10deg);
        }
    }
</style>

<a href="https://github.com/tianguanggliu/tianguanggliu.github.io" class="github-corner tooltipped hide-on-med-and-down" target="_blank"
   data-tooltip="Fork Me" data-position="left" data-delay="50">
    <svg viewBox="0 0 250 250" aria-hidden="true">
        <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
        <path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
              fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
        <path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
              fill="currentColor" class="octo-body"></path>
    </svg>
</a>
        
    </nav>
</header>



<div class="bg-cover post-cover" style="background-image: url('http://pgtoq1cmw.bkt.clouddn.com/blog/imgbanner.jpg')">
    <div class="container">
        <div class="row">
            <div class="col s12 m12 l12">
                <div class="brand">
                    <div class="description center-align post-title">
                        openseadragon
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>



<main class="container content">

    
    <!-- 文章内容详情 -->
<div id="artDetail">
    <div class="card">
        <div class="card-content article-info">
            
            <div class="article-tag">
                
                <a href="/tags/H5/" target="_blank">
                    <span class="chip bg-color">H5</span>
                </a>
                
                <a href="/tags/移动端/" target="_blank">
                    <span class="chip bg-color">移动端</span>
                </a>
                
            </div>
            
            <div class="post-info">
                
                <span class="post-cate">
                    <i class="fa fa-bookmark fa-fw icon-category"></i>
                    
                    <a href="/categories/HTML5/" class="post-category" target="_blank">
                        HTML5
                    </a>
                    
                </span>
                

                <span class="post-date">
                    <i class="fa fa-clock-o fa-fw"></i>2018-10-18
                </span>
            </div>
        </div>
        <hr>
        <div class="card-content article-card-content">
            <div id="articleContent">
                <h6 id="项目介绍：H5页面，实现长按按钮图片（清明上河图）自动播放"><a href="#项目介绍：H5页面，实现长按按钮图片（清明上河图）自动播放" class="headerlink" title="项目介绍：H5页面，实现长按按钮图片（清明上河图）自动播放 . . ."></a>项目介绍：H5页面，实现长按按钮图片（清明上河图）自动播放 . . .</h6><blockquote>
<p><a href="https://github.com/openseadragon/openseadragon" title="openseadragon" target="_blank" rel="noopener">openseadragon</a> 基于Web的开源查看器，用于高分辨率可缩放图像，以纯JavaScript实现，适用于桌面和移动设备。</p>
</blockquote>
<h3 id="技术背景"><a href="#技术背景" class="headerlink" title="技术背景"></a>技术背景</h3><p>图片大部分都是压缩过的，大部分为JPEG PNG BMP其中BMP格式是点阵形式，当图片翻译到内存之后无论压没压缩过都会变成BMP格式放进内存，在这个过程中，图片数据会几倍的增大，就比如JPEG，一张1M大小的JPEG格式的图片，翻译到内存可能就会变成7倍左右，也就是7M会放在电脑内存里面，如果显示一张100M的JPEG图片，放进内存的话可能就会成为1G，好了如果是1G的图片呢，你的电脑内存还够用吗，再如果在手机端显示呢？ <strong>最后找到两个js库来实现项目需求 <a href="https://github.com/Leaflet/Leaflet" target="_blank" rel="noopener">Leaflet</a> 和 <a href="https://github.com/openseadragon/openseadragon" target="_blank" rel="noopener">openseadragon</a></strong></p>
<h3 id="技术实现"><a href="#技术实现" class="headerlink" title="技术实现"></a>技术实现</h3><h5 id="一、库文件下载"><a href="#一、库文件下载" class="headerlink" title="一、库文件下载"></a>一、库文件下载</h5><p>首先进入<a href="http://openseadragon.github.io/" target="_blank" rel="noopener">官网</a>或<a href="https://github.com/openseadragon/openseadragon" target="_blank" rel="noopener">GitHub</a>下载工程中我们只需要用到openseadragon.min.js库</p>
<h5 id="二、准备图片"><a href="#二、准备图片" class="headerlink" title="二、准备图片"></a>二、准备图片</h5><p>OpenSeadragon支持很多图片协议和格式，通常这些图片都是由很多图片的切片组成的，例如一张很大的图，需要剪裁成很多小图，按照一定的命名和存储规则存放。官网为我们提供了许多切图<a href="http://openseadragon.github.io/examples/creating-zooming-images/" target="_blank" rel="noopener">工具</a> 根据需要可以根据编程或客户端来实现，我选取的是<a href="https://download.microsoft.com/download/4/D/5/4D55442C-D183-4F0F-9163-AD31A09BDFC1/Deep%20Zoom%20Composer.msi" target="_blank" rel="noopener">Deep Zoom Composer</a>（点击可直接下载）<br>安装完成后打开软件新建一个工程，把大图片拖进去，显示如下图<br><img src="http://pgtoq1cmw.bkt.clouddn.com/blog/imgdeep-zoom-composer.jpg" width="50%" hegiht="50%" align="center" alt="新工程"></p>
<p>点击Export，Output Type选择imags，随便起个名字例如bingImg，Export options选择Export as a collection，点击Export即可在相应路径生成文件。如下图，标注部分请注意<br><img src="http://pgtoq1cmw.bkt.clouddn.com/blog/imgexport.jpg" width="50%" hegiht="50%" align="center" alt="导出页面"><br>找到导出后的文件dzc_output_images下的就是我们需要的文件，xml中有代码需要用到的数据，_files文件夹就是所有图片文件。<em>XML如下:</em></p>
<pre class="line-numbers language-html"><code class="language-html">  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Image</span> <span class="token attr-name">TileSize</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>256<span class="token punctuation">"</span></span> <span class="token attr-name">Overlap</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>1<span class="token punctuation">"</span></span> <span class="token attr-name">Format</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>jpg<span class="token punctuation">"</span></span> <span class="token attr-name">ServerFormat</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Default<span class="token punctuation">"</span></span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://schemas.microsoft.com/deepzoom/2009<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Size</span> <span class="token attr-name">Width</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>1920<span class="token punctuation">"</span></span> <span class="token attr-name">Height</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>1080<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>Image</span><span class="token punctuation">></span></span>
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre>
<h5 id="三、代码"><a href="#三、代码" class="headerlink" title="三、代码"></a>三、代码</h5><p>直接上代码，查看<a href="https://github.com/tianguanggliu/H5demo/tree/master/openseadragon" target="_blank" rel="noopener">完整代码</a>，查看<a href="https://blog.emper.cn/cases/openseadragon.html">效果</a></p>
<pre class="line-numbers language-javascript"><code class="language-javascript">    <span class="token keyword">function</span> <span class="token function">openMap</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        openSeadragonInstance <span class="token operator">=</span> <span class="token function">OpenSeadragon</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
        minZoomLevel<span class="token punctuation">:</span> defaultZoomLevel<span class="token punctuation">,</span>     <span class="token comment" spellcheck="true">// 最小缩放等级</span>
        animationTime<span class="token punctuation">:</span> <span class="token number">0.3</span><span class="token punctuation">,</span>
        visibilityRatio<span class="token punctuation">:</span> <span class="token number">1.0</span><span class="token punctuation">,</span>
        maxZoomLevel<span class="token punctuation">:</span> <span class="token number">16</span><span class="token punctuation">,</span>
        constrainDuringPan<span class="token punctuation">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        showNavigator<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>               <span class="token comment" spellcheck="true">// 显示导航</span>
        showZoomControl<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>             <span class="token comment" spellcheck="true">// 则显示+和 - 按钮以放大和缩小。</span>
        showHomeControl<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>             <span class="token comment" spellcheck="true">// 显示主页</span>
        showFullPageControl<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>         <span class="token comment" spellcheck="true">// 显示全屏</span>
        iOSDevice<span class="token punctuation">:</span> <span class="token operator">!</span><span class="token function">isAndroid</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
        immediateRender<span class="token punctuation">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>              <span class="token comment" spellcheck="true">// 提供非常模糊到锐利的效果。建议将移动设备的设置更改为true。</span>
        defaultZoomLevel<span class="token punctuation">:</span> defaultZoomLevel<span class="token punctuation">,</span> <span class="token comment" spellcheck="true">// 首次打开图像或单击主页按钮时使用的缩放级别。如果为0，则调整以适合查看者。</span>
        useCanvas<span class="token punctuation">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>                    <span class="token comment" spellcheck="true">// 设置为false，即使支持canvas，也不使用HTML canvas元素进行图像渲染。 安卓关闭 ios 开启</span>
        id<span class="token punctuation">:</span> <span class="token string">'openSeadragon'</span><span class="token punctuation">,</span>
        prefixUrl<span class="token punctuation">:</span> <span class="token string">'./images/'</span><span class="token punctuation">,</span>
        preserveImageSizeOnResize<span class="token punctuation">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        minPixelRatio<span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
        tileSources<span class="token punctuation">:</span> <span class="token punctuation">{</span>
            Image<span class="token punctuation">:</span> <span class="token punctuation">{</span>
                xmlns<span class="token punctuation">:</span> <span class="token string">'http://schemas.microsoft.com/deepzoom/2009'</span><span class="token punctuation">,</span> <span class="token comment" spellcheck="true">// 在xml中可以找到</span>
                Url<span class="token punctuation">:</span> <span class="token string">'./ios_files/'</span><span class="token punctuation">,</span>                                 <span class="token comment" spellcheck="true">// 文件夹</span>
                Overlap<span class="token punctuation">:</span> <span class="token string">'1'</span><span class="token punctuation">,</span>
                TileSize<span class="token punctuation">:</span> <span class="token string">'256'</span><span class="token punctuation">,</span>                                    <span class="token comment" spellcheck="true">// 在xml中可以找到</span>
                Format<span class="token punctuation">:</span> <span class="token string">'jpg'</span><span class="token punctuation">,</span>                                      <span class="token comment" spellcheck="true">// 在xml中可以找到</span>
                Size<span class="token punctuation">:</span> <span class="token punctuation">{</span>
                    Height<span class="token punctuation">:</span> <span class="token string">'46756'</span><span class="token punctuation">,</span>
                    Width<span class="token punctuation">:</span> <span class="token string">'2071'</span>
                <span class="token punctuation">}</span>

            <span class="token punctuation">}</span>

        <span class="token punctuation">}</span>

    <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

            </div>
            <hr/>

            
            <style>
    #reward {
        margin: 40px 0;
        text-align: center;
    }

    #reward .reward-link {
        font-size: 1.88rem;
    }

    #reward .btn-floating:hover {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    #rewardModal {
        width: 320px;
        height: 350px;
    }

    #rewardModal .reward-title {
        margin: 15px auto;
        padding-bottom: 5px;
    }

    #rewardModal .modal-content {
        padding: 10px;
    }

    #rewardModal .close {
        position: absolute;
        right: 15px;
        top: 15px;
        color: rgba(0, 0, 0, 0.5);
        font-size: 1.3rem;
        line-height: 20px;
        cursor: pointer;
    }

    #rewardModal .reward-tabs {
        margin: 0 auto;
        width: 210px;
    }

    .reward-tabs .tabs {
        height: 38px;
        margin: 0px auto;
        padding-left: 0;
    }

    .reward-tabs .tabs .tab {
        height: 38px;
        line-height: 38px;
    }

    .reward-tabs .tab a {
        color: #fff;
        background-color: #ccc;
    }

    .reward-tabs .tab a:hover {
        color: #fff;
    }

    .reward-tabs .wechat-tab .active {
        color: #fff;
        background-color: #22AB38;
    }

    .reward-tabs .alipay-tab .active {
        color: #fff;
        background-color: #019FE8;
    }

    .reward-tabs .reward-img {
        width: 210px;
        height: 210px;
    }
</style>

<div id="reward">
    <a class="reward-link btn-floating btn-large waves-effect waves-light red">赏</a>

    <!-- Modal Structure -->
    <div id="rewardModal" class="modal">
        <div class="modal-content">
            <a class="close"><i class="fa fa-close"></i></a>
            <h4 class="reward-title">您的赏识是我前进的动力</h4>
            <div class="reward-content">
                <div class="reward-tabs">
                    <ul class="tabs">
                        <li class="tab wechat-tab waves-effect waves-light"><a class="active" href="#wechat">微信</a></li>
                        <li class="tab alipay-tab waves-effect waves-light"><a href="#alipay">支付宝</a></li>
                    </ul>
                    <div id="wechat">
                        <img src="/medias/reward/wechat.png" class="reward-img" alt="微信打赏二维码">
                    </div>
                    <div id="alipay">
                        <img src="/medias/reward/alipay.png" class="reward-img" alt="支付宝打赏二维码">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {
        $('#reward .reward-link').on('click', function () {
            $('#rewardModal').openModal();
        });

        $('#rewardModal .close').on('click', function () {
            $('#rewardModal').closeModal();
        });
    });
</script>
            

            <link rel="stylesheet" type="text/css" href="/libs/share/css/share.min.css">

<div id="article-share">
    <!-- 
    <div class="social-share" data-disabled="qzone" data-wechat-qrcode-helper="<p>微信里点“发现”->“扫一扫”二维码便可查看分享。</p>"></div>
     -->
</div>

<script src="/libs/share/js/social-share.min.js"></script>

            <div class="reprint">
                <p>
                    <span class="reprint-tip">转载请注明: </span>
                    <a href="https://blog.emper.cn" class="b-link-green">Emper</a>
                    <i class="fa fa-angle-right fa-lg fa-fw text-color"></i>
                    <a href="/20181018/openseadragon.html" class="b-link-green">openseadragon</a>
                </p>
            </div>
        </div>
    </div>

    
        <link rel="stylesheet" href="/libs/gitalk/gitalk.css">
<link rel="stylesheet" href="/css/my-gitalk.css">

<div class="card gitalk-card" data-aos="fade-up">
    <div id="gitalk-container" class="card-content"></div>
</div>

<script src="/libs/gitalk/gitalk.min.js"></script>
<script>
    let gitalk = new Gitalk({
        clientID: '6aec2ee93044fa63b62c',
        clientSecret: 'd6a561b89cd54705855642b167e652fa6c8ff5d3',
        repo: 'tianguanggliu.github.io',
        owner: 'tianguanggliu',
        admin: "tianguanggliu",
        id: '2018-10-18T17-21-29',
        distractionFreeMode: false  // Facebook-like distraction free mode
    });

    gitalk.render('gitalk-container');
</script>
    

    

    

    

<article id="prenext-posts" class="prev-next articles">
    <div class="row article-row">
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge left-badge text-color">上一篇</div>
            <div class="card">
                <a href="/20181031/material.html">
                    <div class="card-image">
                        
                        <img src="http://pgtoq1cmw.bkt.clouddn.com/blog/article/covers/angular-material-banner.jpg" class="responsive-img" alt="material">
                        
                        <span class="card-title">material中hammerjs无效</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary">技术问题
Angular Material Material Design components for Angular, 最近项目中用到  Angular Material  按照官网 guides 完成后发现手势相关的组件无效！！

解</div>
                    <div class="publish-info">
                        <span class="publish-date">
                            <i class="fa fa-clock-o fa-fw icon-date"></i>2018-10-31
                        </span>
                        <span class="publish-author">
                            
                            <i class="fa fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/Angular/" class="post-category" target="_blank">
                                    Angular
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/Material/" target="_blank">
                        <span class="chip bg-color">Material</span>
                    </a>
                    
                    <a href="/tags/Angular/" target="_blank">
                        <span class="chip bg-color">Angular</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge right-badge text-color">下一篇</div>
            <div class="card">
                <a href="/20181017/hello-world.html">
                    <div class="card-image">
                        
                        
                        <img src="/medias/featureimages/12.jpg" class="responsive-img" alt="Hello World">
                        
                        <span class="card-title">openseadragon副本</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary">Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hex</div>
                    <div class="publish-info">
                            <span class="publish-date">
                                <i class="fa fa-clock-o fa-fw icon-date"></i>2018-10-17
                            </span>
                        <span class="publish-author">
                            
                            <i class="fa fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/前端/" class="post-category" target="_blank">
                                    前端
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/前端/" target="_blank">
                        <span class="chip bg-color">前端</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
    </div>
</article>
</div>
    

</main>

<footer class="page-footer bg-color">
    <div class="container row center-align">
        <div class="col s12 m8 l8 copy-right">
            本站由&copy;<a href="https://github.com/tianguanggliu" target="_blank">emper</a>基于
            <a href="https://hexo.io/" target="_blank">Hexo</a> 采用
            <a href="https://github.com/blinkfox/hexo-theme-matery" target="_blank">hexo-theme-matery</a>的主题搭建.
        </div>
        <div class="col s12 m4 l4 social-link"><a href="https://github.com/tianguanggliu" class="tooltipped" target="_blank" data-tooltip="我的GitHub" data-position="top" data-delay="50">
    <i class="fa fa-github"></i>
</a>
<a href="mailto:tianguangliu@163.com" class="tooltipped" target="_blank" data-tooltip="邮件联系我" data-position="top" data-delay="50">
    <i class="fa fa-envelope-open"></i>
</a>
<a href="#!" class="tooltipped" data-tooltip="QQ联系我: 734930392" data-position="top" data-delay="50">
    <i class="fa fa-qq"></i>
</a>

<a href="/atom.xml" class="tooltipped" target="_blank" data-tooltip="RSS 订阅" data-position="top" data-delay="50">
    <i class="fa fa-rss"></i>
</a>
</div>
    </div>
</footer>

<div class="progress-bar"></div>


<!-- 搜索遮罩框 -->
<div id="searchModal" class="modal">
    <div class="modal-content">
        <div class="search-header">
            <span class="title">搜索</span>
            <input type="search" id="searchInput" name="s" placeholder="请输入搜索的关键字"
                   class="search-input" autofocus="">
        </div>
        <div id="searchResult"></div>
    </div>
</div>

<script src="/js/search.js"></script>
<script type="text/javascript">
    searchFunc("/" + "search.xml", 'searchInput', 'searchResult');
</script>
<!-- 回到顶部按钮 -->
<div id="backTop" class="top-scroll">
    <a class="btn-floating btn-large waves-effect waves-light" href="#!">
        <i class="fa fa-angle-double-up"></i>
    </a>
</div>


<script src="/libs/materialize/js/materialize.min.js"></script>
<script src="/libs/masonry/masonry.pkgd.min.js"></script>
<script src="/libs/aos/aos.js"></script>
<script src="/libs/scrollprogress/scrollProgress.min.js"></script>
<script src="/libs/lightGallery/js/lightgallery-all.min.js"></script>
<script src="/js/matery.js"></script>
</body>
</html>